<!DOCTYPE html>
<html>
<head>
    <%if(articleList.length!=0){%>
    <title><%=articleList[0].bookcase.name %></title>
    <%}%>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <% include ../../common/public.ejs %>
    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <link href="<%= global.config.path.publicPath %>/custom/css/articleTemplate.css" rel="stylesheet">
    <style>
        img{
            max-width: 100%;
        }
    </style>
</head>
<body>
<link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
<link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">

<div class="tog-news-container">
    <%if(articleList.length!=0){%>
    <% for(let i = 0;i < articleList.length;i++){ %>
    <div class="tog-news-list">
        <div class="tog-news-panel weui-flex">
            <!--<span class="icon fa fa-desktop leftFa" style=""></span>-->
            <%if(articleList[i].img){%>
            <img src="<%= global.config.path.publicPath %>/uploadFiles<%= articleList[i].img.filePath %>" alt="" class="tog-headImg">
            <%}%>
            <div class="tog-news-title ">
                <p class="tog-title-font"><%= articleList[i].name %></p>
            </div>
            <span class="icon fa fa-angle-right toggle-fa-angle-right" style="font-size:24px;"></span>
        </div>
    </div>
    <div class="tog-hiddenPart">
        <%if(articleList[i].content ){%>
        <%- articleList[i].content %>
        <%}else {%>
        <p class="text-center">暂无内容</p>
        <%}%>
    </div>
    <% } %>
    <%}else{%>
    <img src="<%=global.config.path.publicPath%>/custom/images/icon/nomore.png" alt="" class="noMore">
    <h2 class="text-center">暂无更多内容啦</h2>
    <%}%>
</div>
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/articleTemplate.js"></script>
<script>
    $('.tog-news-panel').click(function () {
        $(this).find('.toggle-fa-angle-right').addClass('addAmi');
        $(this).closest('.tog-news-list').toggleClass('tog-changeColor');
        $(this).find('.toggle-fa-angle-right').toggleClass('changeleft changedLeft');
        $(this).closest('.tog-news-list').next().slideToggle();

        $(this).closest('.tog-news-list').siblings('.tog-news-list').removeClass('tog-changeColor');
        $(this).closest('.tog-news-list').siblings('.tog-news-list').find('.toggle-fa-angle-right').removeClass('changeleft changedLeft');
        $(this).closest('.tog-news-list').siblings('.tog-news-list').next().slideUp();
    })
</script>
</body>
</html>
